for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
var sjcl = require('sjcl');
var hmacSha512 = function(key) {
var hasher = new sjcl.misc.hmac(key, sjcl.hash.sha512);
this.encrypt = function() {
return hasher.encrypt.apply(hasher, arguments);
};
var pbkdf2Sha512 = function(pw, salt, iterations, keySizeBytes) {
salt = sjcl.codec.hex.toBits(salt.toString('hex'));
var data = sjcl.codec.hex.toBits(pw.toString('hex'));
return new Buffer(sjcl.codec.hex.fromBits(sjcl.misc.pbkdf2(data, salt, iterations, keySizeBytes * 8, hmacSha512)), 'hex');
Buffer
/** global: Buffer */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
module.exports = {
digest: pbkdf2Sha512
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.